package pl.mcnova.model.combo;

import pl.mcnova.model.dao.DeviceDAO;
import pl.mcnova.model.entity.Device;

public class DeviceProducerComboBoxModel extends ComboModel<Device> {

	private DeviceDAO deviceDAO;

	public DeviceProducerComboBoxModel() {
		deviceDAO = new DeviceDAO();
		data = deviceDAO.getAllGroupedByNumbers("producer");
		// int index = this.get
		selectedItem = null;// data.get(getSelectedItem()());
	}

	public void refresh() {
		data = deviceDAO.getAllGroupedByNumbers("producer");
	}

}